{% extends "base.html" %}

{% block content %}

<h2>Reading list for {{ user.nickname }}</h2>

{% if not reading_list %}
<em>Your reading list is empty!</em>

{% else %}
<table class="reading_list">
<tr>
<th>URL</th>
<th>Action</th>
</tr>

{% for entry in reading_list %}
<tr class="{% cycle odd,even %}">
<td><a href="{{ entry.url|escape }}" title="{{ entry.url|escape }}">
  {{ entry.url|slice:":75"|escape }}</a></td>

<td><a href="/delete?key={{ entry.key }}">delete</a></td>
<td><a href="/view?key={{ entry.key }}">view</a></td>
</tr>
{% endfor %}
</table>

<hr>
<h3>Download Your Reading List To Your Amazon Kindle</h3>

<h4>Go to <tt><b> {{ dlurl }}</b></tt> on your Amazon Kindle.</h4>

<p>
<i>Note that this url is publicly accessible and not
authenticated. Don't share it unless you are ok with others viewing it.</i>
<p>The first line in this book will be a link to download the latest
version of it. Click the link on the Kindle to get a new book with anything that's changed
since the previous download.
<P>
To do this, Click on "Menu", then
"Experimental", then "Basic Web". At the top of the page, select
"Enter URL" and enter <tt>{{ dlurl }}</tt>. Say OK when it
asks if you want to download the content to your Kindle, and after
that it should appear on your Kindle's content list.
{% endif %}

<hr>
<h3>Add content to your reading list</h3>

<h4>Bookmarklet</h4>

Drag one or both of the folowing links to your toolbar (the little space under the url bar that sometimes contains things like "getting started"): <p>
<ol><li>{{ feed_bookmarklet }}.This will subscribe to a feed of the
  current page, if one exists. </li>
  <li> {{ bookmarklet }}. This will add the current url to the list of
  documents you get in your next feed.
  </li></ol>

  <br/>Click on the bookmarklet when on a page you're interested in..


<h4>Advanced Options (if the bookmarklets really don't cut it)</h4>
<h4>Static HTML</h4>
If there's a printer-friendly format of the webpage, it's best to
submit that, as that's likely to display better on the Kindle. Also,
if the webpage requires a login, we won't be able to download
it, and you'll need to use the blob interface below.

<P>
<form action="/add_url">
URL: <input size=100 name="url">
<input value="Add URL" type="Submit">
</form>

<h4>Add a Feed</h4>

You can add RSS, Atom, or other feeds.  This system will download the
feed each time you attempt to download a book. If you initiate the book
download from a previous version of the book, you will get all available
feeds since that version. Otherwise you will get all available
  versions.  Note that you have to enter the URL for the rss feed, not
  the html file. Using the bookmarklet is really way simpler.
<P>
<form action="/add_feed">
URL: <input size=100 name="url">
<input value="Add Feed" type="Submit">
</form>

<h3>Report a Problem</h3>

Problems with your reading list? I'm not surprised; this stuff is
pretty flaky. If there's a problem with a particular page, it would
help me out if you could report it using this form. It will record the
URLs in your current reading list, so that we can try to fix the problem.

<form action="/problem">
Problem type:
<select name="problemtype">
<option value="none">Select a Problem Type</option>
{% for problem in problem_types.items %}
<option value="{{ problem.0 }}">{{ problem.1 }}</option>
{% endfor %}
</select>
<input type=submit value="Report Problem">
</form>

<h4>Add HTML</h4>

If your page requires a login, you can view the page yourself and then
paste the contents into the box below. When viewing the target page in
Firefox, select the "View" menu and then "View Source". Copy all of
the text and paste it into the large box below. You also need to give
the URL, so that we can identify the webpage in your reading
list.

<P>
<form action="/add_content" method="POST">
URL: <input size=100 name="url"><br>
<textarea type="text" rows=15 cols=100 name="content"></textarea><br>
<input value="Add Content" type="Submit">
</form>


{% endblock content %}
